import request from '@/utils/requst'
import { post,postFormDataAction,download } from "./manage";
//登录
const login = (params) => post('/lsydfk/login/sms/verify',params)
//获取验证码
const getCode = (params)=>
  request.post('/lsydfk/login/send/sms?telephone='+params)
//获取附件
const getProjectFileList = (params)=>
  request.post('/lsydfk/annexes/getAnnexInfo',params)
//获取项目信息
const getProjectListData = (params)=>
  request.post('/lsydfk/applies/page/query/PC',params)

const getProjectInfoDetail = (params)=> 
  request.get('/ssnydsq/applies/project/id?id='+params)
//删除附件
const deleteFileForId = (params)=>
  postFormDataAction('/lsydfk/annexes/delete/ByAnnexId?annexId='+params)

const saveProjectData = (params)=> 
  request.post('/ssnydsq/applies/fileZip/push',params)

const downloadFile = (params)=> 
  download('/lsydfk/annexes/downloadById',params)

const editProject = (params)=>
  request.post('/ssnydsq/applies/project/file/commit',params)

const getDictData = (params)=>
  request.get('/lsydfk/dict/get/dictInfo?dictType='+params)

const getFileByProjectId = (params)=>
  request.post('/lsydfk/applies/get/uploadAnnex',params)

const pushFileToPC = (params)=>
  request.post('/lsydfk/lsydfk/pushFileToPC',params)

 
const getYkbUserInfo = (params)=>
    request.post(`${process.env.VUE_APP_YKBUSER_URL}`,params)
export default{
  login,
  getCode,
  getProjectListData,
  getProjectFileList,
  getProjectInfoDetail,
  deleteFileForId,
  saveProjectData,
  downloadFile,
  editProject,
  getDictData,
  getFileByProjectId,
  pushFileToPC,
  getYkbUserInfo,
}